/* 全局样式 */
:root {
  /* 主色调 - 更加柔和的蓝灰色系 */
  --primary-color: #6366f1; /* 柔和的靛蓝 */
  --primary-dark: #4f46e5;
  --primary-light: #a5b4fc;
  --primary-subtle: #f0f1ff;
  
  /* 次要色 - 中性灰色 */
  --secondary-color: #6b7280; /* 温和的灰色 */
  --secondary-light: #9ca3af;
  --secondary-subtle: #f9fafb;
  
  /* 功能色 - 低饱和度 */
  --success-color: #22c55e; /* 温和的绿色 */
  --success-light: #dcfce7;
  --warning-color: #f59e0b; /* 温和的橙色 */
  --warning-light: #fef3c7;
  --danger-color: #ef4444; /* 温和的红色 */
  --danger-light: #fef2f2;
  
  /* 背景色 - 温和的中性色 */
  --background-color: #fafafa; /* 温暖的白色 */
  --background-secondary: #f5f5f5;
  --surface-color: #ffffff;
  --surface-hover: #f8fafc;
  --surface-elevated: #ffffff;
  
  /* 文字色 - 高对比度但不刺眼 */
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --text-light: #d1d5db;
  
  /* 边框色 - 极淡的边框 */
  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  --border-subtle: #f9fafb;
  
  /* 阴影 - 更柔和的阴影 */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.03);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.03);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.03);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.05);
  
  /* 圆角 */
  --radius-xs: 0.25rem;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* 图表高度 */
  --chart-height: 400px;
  
  /* 简化的渐变 - 极其微妙 */
  --gradient-subtle: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
  --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  --gradient-surface: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', system-ui, sans-serif;
}

body {
  background: var(--background-color);
  color: var(--text-primary);
  min-height: 100vh;
  overscroll-behavior: none;
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  font-weight: 400;
}

/* 导航栏样式 */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 280px;
  height: 100vh;
  background: var(--surface-color);
  border-right: 1px solid var(--border-color);
  padding: 0;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.sidebar-header {
  padding: 2rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--gradient-subtle);
  position: relative;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
}

.logo-container i {
  font-size: 1.75rem;
  color: var(--primary-color);
}

.logo-container h2 {
  font-size: 1.375rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.nav-links {
  list-style: none;
  padding: 1.5rem 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.5rem;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
  margin: 0.125rem 0;
}

.nav-item i {
  width: 1.25rem;
  text-align: center;
  font-size: 1.125rem;
  transition: all 0.2s ease;
}

.nav-item:hover {
  background: var(--primary-subtle);
  color: var(--primary-color);
  border-left-color: var(--primary-light);
}

.nav-item.active {
  background: var(--primary-subtle);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  font-weight: 600;
}

.nav-item.active i {
  transform: scale(1.05);
}

/* 主内容区域 */
.main-content {
  padding: 1.5rem;
  margin-left: 280px;
  transition: margin-left 0.3s ease;
  min-height: 100vh;
  background: var(--background-color);
  overflow-x: hidden;
}

/* 页面头部 */
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding: 1.5rem 2rem;
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.header-title h1 {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 0.75rem 0;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-title h1 i {
  font-size: 2rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin: 0;
  font-weight: 400;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  background: var(--surface-hover);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.status-badge i {
  color: var(--primary-color);
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  outline: none;
  background: var(--surface-color);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

.btn:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-light);
  background: var(--surface-hover);
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--secondary-color);
  color: white;
  border-color: var(--secondary-color);
}

.btn-secondary:hover {
  background: var(--text-primary);
  border-color: var(--text-primary);
  box-shadow: var(--shadow-md);
}

.btn-success {
  background: var(--success-color);
  color: white;
  border-color: var(--success-color);
}

.btn-success:hover {
  background: #16a34a;
  border-color: #16a34a;
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-xs);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 预测页面导航栏 */
.prediction-navigation {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  padding: 1rem 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.prediction-nav-items {
  display: flex;
  gap: 0.25rem;
  background: var(--background-secondary);
  border-radius: var(--radius-md);
  padding: 0.375rem;
  border: 1px solid var(--border-light);
}

.prediction-nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  flex: 1;
  justify-content: center;
  text-align: center;
  border: 1px solid transparent;
}

.prediction-nav-item:hover {
  background: var(--surface-color);
  color: var(--primary-color);
  border-color: var(--border-color);
  box-shadow: var(--shadow-xs);
}

.prediction-nav-item.active {
  background: var(--primary-color);
  color: white;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-color);
}

.prediction-nav-item.active:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.prediction-nav-item i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.prediction-nav-item:hover i {
  transform: scale(1.1);
  }

.prediction-nav-item.active i {
  transform: scale(1.1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  }

.prediction-nav-item span {
  font-weight: inherit;
  white-space: nowrap;
}

/* 预测标签页内容 */
.prediction-content {
  position: relative;
}

.prediction-tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
  }

.prediction-tab-content.active {
  display: block;
}

/* =====================
   天气预报式房间占用预测布局
   ===================== */

/* 主容器 */
#analysis .weather-style-layout {
  width: 100%;
  max-width: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* 1. 顶部区域：当前状态 + 占用人数 */
#analysis .current-status-section {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-md);
  align-items: center;
  min-height: 160px;
}

#analysis .current-occupancy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

#analysis .occupancy-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 700;
  justify-content: center;
}

#analysis .occupancy-number {
  font-size: 5rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
  text-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

#analysis .occupancy-unit {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-secondary);
}

#analysis .status-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.3px;
}

#analysis .current-environment {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
}

#analysis .primary-metrics {
  display: flex;
  align-items: center;
  gap: 32px;
  width: 100%;
}

#analysis .metric-large {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#analysis .metric-large .metric-value {
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#analysis .metric-large .metric-label {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.3px;
}

#analysis .metric-status {
  font-size: 2rem;
  font-weight: 600;
  color: var(--warning-color);
  display: flex;
  align-items: center;
  padding: 12px 24px;
  background: var(--warning-light);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(245, 158, 11, 0.2);
  box-shadow: var(--shadow-xs);
}

/* 2. 主要控制区域：类似天气预报的详细信息 */
#analysis .main-control-section {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  min-height: 180px;
}

#analysis .control-cards {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#analysis .control-card {
  background: var(--surface-hover);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#analysis .card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

#analysis .card-icon {
  font-size: 1.5rem;
}

#analysis .card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

#analysis .card-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#analysis .card-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

#analysis .card-action {
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 8px 16px;
  background: var(--primary-subtle);
  border-radius: var(--radius-md);
  text-align: center;
  transition: all 0.2s ease;
}

#analysis .card-action:hover {
  background: var(--primary-light);
  color: white;
}

#analysis .card-status {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* 3. 环境指标网格：类似天气的多指标显示 */
#analysis .environment-metrics-grid {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 16px;
  min-height: 100%;
}

#analysis .metric-item {
  background: var(--surface-hover);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 110px;
  justify-content: space-between;
  transition: all 0.2s ease;
}

#analysis .metric-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

#analysis .metric-icon {
  font-size: 1.8rem;
}

#analysis .metric-name {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.2px;
}

#analysis .metric-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

#analysis .metric-main .metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

#analysis .metric-main .metric-status {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 4px 10px;
  background: var(--surface-color);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
}

/* 4. 每小时预测：天气预报风格的时间线 */
#analysis .hourly-forecast-section {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  min-height: 250px;
}

#analysis .forecast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-light);
}

#analysis .section-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

#analysis .forecast-type {
  font-size: 1rem;
  color: var(--text-secondary);
  flex: 1;
  text-align: center;
}

#analysis .forecast-controls {
  display: flex;
  gap: 10px;
}

#analysis .forecast-btn {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: var(--surface-color);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 60px;
}

#analysis .forecast-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

#analysis .forecast-timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  flex: 1;
  align-items: stretch;
}

#analysis .forecast-hour {
  background: var(--surface-hover);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  height: 100%;
  justify-content: space-between;
  transition: all 0.2s ease;
}

#analysis .forecast-hour.future {
  opacity: 0.6;
  border-style: dashed;
}

#analysis .hour-time {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}

#analysis .hour-icon {
  font-size: 2.5rem;
  margin: 4px 0;
}

#analysis .hour-temp {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

#analysis .hour-people {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 4px 10px;
  background: var(--surface-color);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
}

/* 5. 趋势图表：天气预报式的图表展示 */
#analysis .trend-chart-section {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-md);
  min-height: 300px;
}

#analysis .chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-light);
}

#analysis .chart-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

#analysis .chart-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

#analysis .chart-container {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 24px;
  align-items: stretch;
  width: 100%;
}

#analysis .chart-time-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  height: 100%;
  padding-right: 20px;
  border-right: 2px solid var(--border-light);
}

#analysis .chart-time-labels span {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 5px 0;
  text-align: right;
}

#analysis .chart-area {
  background: var(--background-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  padding: 24px;
  min-height: 200px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

#analysis .trend-chart {
  width: 100%;
  height: 200px;
  background: transparent;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 数据更新闪烁动画 */
@keyframes updateFlash {
  0% {
    background-color: transparent;
  }
  50% {
    background-color: rgba(99, 102, 241, 0.15);
  }
  100% {
    background-color: transparent;
  }
}

.update-flash {
  animation: updateFlash 0.5s ease-in-out;
}

/* Room数据容器样式 */
.room-data-container {
  background: var(--surface-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  text-align: center;
}

.room-header h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.room-header h2 i {
  color: var(--primary-color);
  font-size: 1.25rem;
}

.room-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2rem;
  }
  
.room-data-container .coming-soon {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.02));
  border: 2px dashed rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  margin-top: 1rem;
}

.room-data-container .coming-soon i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  opacity: 0.8;
}

.room-data-container .coming-soon h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.room-data-container .coming-soon p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

/* 时间范围过滤器 */
.time-range-filter {
  background: var(--surface-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.time-range-filter::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-secondary);
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.filter-header h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.filter-header h3 i {
  color: var(--primary-color);
  font-size: 1.125rem;
}

.current-range {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.range-label {
  color: var(--text-secondary);
}

.range-value {
  color: var(--primary-color);
  font-weight: 600;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.date-inputs {
  display: flex;
  gap: 1.5rem;
  align-items: end;
}

.date-input {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.date-input label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.date-input label i {
  color: var(--primary-color);
}

.date-input input {
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  transition: all 0.3s ease;
  background: var(--surface-color);
  font-weight: 500;
}

.date-input input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

/* 部分样式 */
.section {
  display: none;
  width: 100%;
}

.section.active {
  display: block;
  width: 100%;
}

/* 即将推出样式 */
.coming-soon {
  text-align: center;
  padding: 5rem 3rem;
  background: var(--surface-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.coming-soon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-secondary);
}

.coming-soon i {
  font-size: 4rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  opacity: 0.7;
}

.coming-soon h3 {
  color: var(--text-primary);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.coming-soon p {
  color: var(--text-secondary);
  font-size: 1.125rem;
}



/* 预测结果面板 */
.prediction-result-panel {
  background: var(--surface-color);
  border-radius: var(--radius-xl);
  padding: 3rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.prediction-result-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-secondary);
}

.result-placeholder {
  text-align: center;
  color: var(--text-secondary);
}

.result-placeholder i {
  font-size: 3.5rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  opacity: 0.7;
}

.result-placeholder p {
  font-size: 1.125rem;
  margin: 0;
  font-weight: 500;
}

/* 图表容器样式 - 保持原有布局 */
.charts-container {
  display: block;
  will-change: transform;
  transform: translateZ(0);
}

.charts-asymmetric {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.chart-row {
  display: flex;
  gap: 2rem;
  width: 100%;
}

.main-row {
  height: 600px;
}

.bottom-row {
  height: 450px;
}

.chart-large {
  flex: 2;
  width: calc(65% - 1rem);
  min-width: 0;
}

.chart-column-right {
  flex: 1;
  width: calc(35% - 1rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chart-small {
  flex: 1;
  min-height: 320px;
}

.chart-full {
  width: 100%;
}

.chart-container {
  background: var(--surface-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.chart-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.chart-container:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.chart-container:hover::before {
  transform: scaleX(1);
}

.chart-controls {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.6), rgba(255, 255, 255, 0.8));
  will-change: transform;
}

.chart-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
}

.chart-title i {
  color: var(--primary-color);
  font-size: 0.875rem;
}

.chart-info {
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin: 0;
  font-weight: 400;
}

.chart {
  flex: 1;
  min-height: 300px;
  width: 100%;
  will-change: transform;
  transform: translateZ(0);
  contain: layout paint style;
}

/* 加载和错误消息 */
#loading-message, #prediction-loading-message {
  display: none;
  text-align: center;
  padding: 3rem;
  background: var(--surface-color);
  border-radius: var(--radius-xl);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}

.loading-spinner {
  width: 3rem;
  height: 3rem;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1.5rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-message {
  display: none;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: var(--danger-color);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  border: 2px solid rgba(239, 68, 68, 0.2);
  font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .sidebar {
    width: 260px;
  }
  
  .main-content {
    margin-left: 260px;
  }
  

}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
}

  .main-content {
    margin-left: 0;
    padding: 1.5rem;
    border-radius: 0;
}

  .header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
}

  /* 只对数据可视化页面的图表应用响应式布局 */
  #visualization .chart-row {
    flex-direction: column;
    height: auto;
  }
  
  #visualization .main-row, #visualization .bottom-row {
    height: auto;
}

  #visualization .chart-column-right {
    flex-direction: column;
  }
  
  #visualization .chart-small {
    min-height: 350px;
}

  /* 智能预测页面保持左大右小布局 */
  #prediction .chart-row {
    flex-direction: row;
    height: 600px;
  }
  
  #prediction .main-row {
    height: 500px;
  }
  
  #prediction .bottom-row {
    height: 400px;
  }

  #prediction .chart-column-right {
    flex-direction: column;
    width: calc(40% - 1rem);
  }
  
  #prediction .chart-small {
    min-height: 240px;
  }
  
  #prediction .chart-large {
    width: calc(60% - 1rem);
  }

  .date-inputs {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  /* 数据分析页面响应式 */
  #analysis .current-status-section {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }
  
  #analysis .main-control-section {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  #analysis .environment-metrics-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  
  #analysis .forecast-timeline {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  
  #analysis .forecast-hour:nth-child(n+4) {
    display: none;
  }
  
  #analysis .chart-container {
    grid-template-columns: 40px 1fr;
    gap: 12px;
  }

}

@media (max-width: 480px) {
  .main-content {
    padding: 1rem;
  }

  .time-range-filter, .prediction-result-panel {
    padding: 1.5rem;
  }
  
  .chart-controls {
    padding: 0.5rem 0.75rem;
  }
  
  /* 数据分析页面 - 小屏幕优化 */
  #analysis .weather-style-layout {
    padding: 16px;
    gap: 16px;
  }
  
  #analysis .current-status-section,
  #analysis .main-control-section,
  #analysis .hourly-forecast-section,
  #analysis .trend-chart-section {
    padding: 16px;
  }
  
  #analysis .occupancy-number {
    font-size: 4rem;
  }
  
  #analysis .metric-large .metric-value {
    font-size: 3.5rem;
  }
  
  #analysis .forecast-timeline {
    grid-template-columns: repeat(2, 1fr);
  }
  
  #analysis .forecast-hour:nth-child(n+3) {
    display: none;
  }


  
  .sensor-icon {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
  }
  
  /* 超小屏幕下，智能预测页面改为垂直布局 */
  #prediction .chart-row {
    flex-direction: column;
    height: auto;
  }
  
  #prediction .main-row {
    height: auto;
  }
  
  #prediction .chart-column-right {
    flex-direction: row;
    width: 100%;
    gap: 1rem;
  }
  
  #prediction .chart-large {
    width: 100%;
  }
  
  #prediction .chart-small {
    min-height: 300px;
    width: 50%;
  }
}

/* 预测页面图表特殊样式 */
#prediction .chart-container {
  min-width: 200px;
}

#prediction .chart-large {
  min-width: 400px;
}

#prediction .chart-small {
  min-width: 200px;
}

#predictionOccupancyChart {
  min-height: 380px;
}

#predictionTempChart, #predictionLightChart, #predictionSoundChart {
  min-height: 280px;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface-hover);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --surface-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --border-light: #475569;
  }
  
  body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  }
  
  .sidebar {
    background: rgba(30, 41, 59, 0.95);
  }
}

/* ========================================
   智能数据分析 - 专业动画界面样式
   ======================================== */

.data-animation-main {
  background: var(--background-color);
  border-radius: var(--radius-lg);
  padding: 0;
  margin: 2rem 0;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  min-height: 80vh;
  border: 1px solid var(--border-color);
}



/* 控制面板样式 */
.animation-control-panel {
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 2rem;
  position: relative;
  z-index: 10;
}

.control-section {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  margin-bottom: 1rem;
}

/* 时间显示 */
.time-display {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.current-time {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.time-label {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.time-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  font-family: 'Courier New', monospace;
}

.time-range {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  font-family: 'Courier New', monospace;
}

.range-separator {
  color: #d1d5db;
}

/* 播放控制 */
.playback-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}

.control-button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.control-button:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
}

.control-button:active {
  transform: translateY(0);
}

.control-button.playing {
  background: var(--warning-color);
  box-shadow: var(--shadow-sm);
}

.speed-selector {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: center;
}

.speed-selector label {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
}

.speed-selector select {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.5rem;
  font-size: 0.875rem;
  color: #374151;
  min-width: 80px;
}

/* 视图模式选择器 */
.view-mode-selector {
  display: flex;
  justify-content: flex-end;
}

.mode-buttons {
  display: flex;
  background: #f3f4f6;
  border-radius: 0.75rem;
  padding: 0.25rem;
  gap: 0.25rem;
}

.mode-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-btn.active {
  background: white;
  color: #374151;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mode-btn:hover:not(.active) {
  color: #374151;
}

/* 时间轴容器 */
.timeline-container {
  position: relative;
  margin-top: 1rem;
}

.timeline-track {
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  position: relative;
  margin: 1rem 0;
}

.timeline-progress {
  height: 100%;
  background: var(--primary-color);
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s ease;
}

.timeline-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 20px;
  height: 20px;
  background: white;
  border: 3px solid #667eea;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: left 0.1s ease;
}

.timeline-slider {
  width: 100%;
  height: 6px;
  background: transparent;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}

.timeline-slider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  background: transparent;
  cursor: pointer;
}

.timeline-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: transparent;
  cursor: pointer;
  border: none;
}

/* 主要可视化区域 */
.visualization-area {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  padding: 2rem;
  position: relative;
  z-index: 5;
  min-height: 60vh;
}

/* 数据可视化容器 */
.data-visualization-container {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 2rem;
}

.visualization-header {
  text-align: center;
  margin-bottom: 2rem;
}

.visualization-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #374151;
  margin: 0 0 0.5rem 0;
}

.visualization-header p {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0;
}

/* 传感器网格 */
.sensor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.sensor-item {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.sensor-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.sensor-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient);
  transition: all 0.3s ease;
}

.temperature-sensor::before { --gradient: linear-gradient(90deg, #f87171, #fca5a5); }
.light-sensor::before { --gradient: linear-gradient(90deg, #fbbf24, #fde047); }
.sound-sensor::before { --gradient: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.co2-sensor::before { --gradient: linear-gradient(90deg, #34d399, #6ee7b7); }
.motion-sensor::before { --gradient: linear-gradient(90deg, #6366f1, #8b5cf6); }
.room-status::before { --gradient: linear-gradient(90deg, #6366f1, #8b5cf6); }

.sensor-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.temperature-sensor .sensor-icon { background: #f87171; }
.light-sensor .sensor-icon { background: #fbbf24; }
.sound-sensor .sensor-icon { background: #8b5cf6; }
.co2-sensor .sensor-icon { background: #34d399; }
.motion-sensor .sensor-icon { background: #6366f1; }
.room-status .sensor-icon { background: #6366f1; }

.sensor-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.8; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.4; }
}

.sensor-info {
  flex: 1;
}

.sensor-label {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.sensor-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  font-family: 'Courier New', monospace;
}

.sensor-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.2); }
}

.sensor-indicator.warning {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}

.sensor-indicator.danger {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

/* 数据图表面板 */
.data-charts-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* 数据卡片 */
.data-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.data-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.data-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: white;
}

.temperature-card .card-icon { background: #f87171; }
.light-card .card-icon { background: #fbbf24; }
.co2-card .card-icon { background: #34d399; }
.motion-card .card-icon { background: #6366f1; }

.card-content {
  flex: 1;
}

.card-label {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.card-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.card-trend {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: #10b981;
}

.card-trend i {
  font-size: 0.625rem;
}

/* 动态图表 */
.dynamic-charts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chart-container, .radar-container {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.chart-container h3, .radar-container h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 1rem 0;
  text-align: center;
}

.chart {
  height: 200px;
  width: 100%;
}

.radar-container .chart {
  height: 250px;
}

/* 底部统计面板 */
.statistics-panel {
  background: rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1.5rem 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
  z-index: 5;
}

.stat-item {
  text-align: center;
}

.stat-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  font-family: 'Courier New', monospace;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .visualization-area {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .data-charts-panel {
    order: -1;
  }
}

@media (max-width: 768px) {
  .control-section {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
  }
  
  .data-cards {
    grid-template-columns: 1fr;
  }
  
  .statistics-panel {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  
  .data-animation-main {
    margin: 1rem 0;
  }
}

@media (max-width: 480px) {
  .animation-control-panel {
    padding: 1rem;
  }
  
  .visualization-area {
    padding: 1rem;
  }
  
  .statistics-panel {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
}

/* 2D场景容器 */
.scene-2d-container {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  height: 400px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

#room-2d-canvas {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  display: block;
}

.scene-overlay {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  pointer-events: none;
}

.scene-info {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.scene-title {
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.scene-subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

/* 实时流图样式 - 现代美观设计 */
.stream-chart-section {
    margin-top: 30px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 
        0 20px 40px rgba(15, 23, 42, 0.08),
        0 8px 16px rgba(15, 23, 42, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.stream-chart-section:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 25px 50px rgba(15, 23, 42, 0.12),
        0 12px 24px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.stream-chart-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(168, 85, 247, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.stream-chart-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(99, 102, 241, 0.6) 0%, 
        rgba(139, 92, 246, 0.6) 25%, 
        rgba(236, 72, 153, 0.6) 50%, 
        rgba(168, 85, 247, 0.6) 75%, 
        rgba(99, 102, 241, 0.6) 100%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.stream-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.stream-title h3 {
    color: #1e293b;
    font-size: 28px;
    margin: 0;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.stream-title h3 i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-right: 12px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-4px); }
}

.stream-subtitle {
    color: #64748b;
    margin: 8px 0 0 0;
    font-size: 15px;
    font-weight: 500;
    font-style: italic;
}

.stream-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stream-control-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    color: #6366f1;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.stream-control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.stream-control-btn:hover::before {
    left: 100%;
}

.stream-control-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}

.stream-control-btn.active {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.stream-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid rgba(226, 232, 240, 0.5);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    animation: pulse-glow 2s infinite;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.status-indicator.active {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

@keyframes pulse-glow {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.1);
        box-shadow: 0 0 16px rgba(239, 68, 68, 0.6);
    }
}

.status-text {
    color: #475569;
    font-size: 13px;
    font-weight: 600;
}

.stream-chart-container {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
    border-radius: 20px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 4px 16px rgba(15, 23, 42, 0.04),
        0 2px 8px rgba(15, 23, 42, 0.02);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.stream-chart {
    width: 100%;
    height: 450px;
    border-radius: 16px;
    overflow: hidden;
}

.stream-info {
    position: relative;
    z-index: 1;
}

.stream-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(145deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.6) 100%);
    border: 1px solid rgba(226, 232, 240, 0.5);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.stream-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stream-stats .stat-item:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.stream-stats .stat-label {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stream-stats .stat-value {
    color: #1e293b;
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .stream-chart-section {
        padding: 25px 20px;
        margin-top: 25px;
    }
    
    .stream-title h3 {
        font-size: 24px;
    }
    
    .stream-chart {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .stream-chart-section {
        padding: 20px 15px;
        border-radius: 16px;
    }
    
    .stream-header {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    
    .stream-title {
        text-align: center;
    }
    
    .stream-title h3 {
        font-size: 22px;
    }
    
    .stream-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .stream-stats {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    
    .stream-chart {
        height: 350px;
    }
    
    .stream-chart-container {
        padding: 20px 15px;
        margin: 20px 0;
    }
}

@media (max-width: 480px) {
    .stream-chart-section {
        margin-top: 20px;
        padding: 15px 10px;
    }
    
    .stream-title h3 {
        font-size: 20px;
    }
    
    .stream-subtitle {
        font-size: 14px;
    }
    
    .stream-control-btn {
        padding: 10px 14px;
        font-size: 13px;
        gap: 6px;
    }
    
    .stream-chart {
        height: 280px;
    }
    
    .stream-stats .stat-label {
        font-size: 11px;
    }
    
    .stream-stats .stat-value {
        font-size: 16px;
    }
} 